﻿using System;

class BitsExchange
{
    static void Main()
    {
        Console.Write("Enter a number: ");
        uint number = uint.Parse(Console.ReadLine());
        uint mask3rdBit = (number & 1 << 3);
        uint bit3 = mask3rdBit >> 3;
        uint mask4thBit = (number & 1 << 4);
        uint bit4 = mask4thBit >> 4;
        uint mask5thBit = (number & 1 << 5);
        uint bit5 = mask5thBit >> 5;
        uint mask24thBit = (number & 1 << 24);
        uint bit24 = mask24thBit >> 24;
        uint mask25thBit = (number & 1 << 25);
        uint bit25 = mask25thBit >> 25;
        uint mask26thBit = (number & 1 << 26);
        uint bit26 = mask26thBit >> 26;
        uint result;
        uint helpValue;
        if (bit3 == 0)
        {
            helpValue = number & ((uint)(1 << 24));
        }
        else
        {
            helpValue = number | 1 << 24;
        }
        result = helpValue;
        if (bit4 == 0)
        {
            helpValue = result & ~((uint)(1 << 25));
        }
        else
        {
            helpValue = result | 1 << 25;
        }
        result = helpValue;
        if (bit5 == 0)
        {
            helpValue = result & ~((uint)(1 << 26));
        }
        else
        {
            helpValue = result | 1 << 26;
        }
        result = helpValue;
        if (bit24 == 0)
        {
            helpValue = result & ~((uint)(1 << 3));
        }
        else
        {
            helpValue = result | 1 << 3;
        }
        result = helpValue;
        if (bit25 == 0)
        {
            helpValue = result & ~((uint)(1 << 4));
        }
        else
        {
            helpValue = result | 1 << 4;
        }
        result = helpValue;
        if (bit26 == 0)
        {
            helpValue = result & ~((uint)(1 << 5));
        }
        else
        {
            helpValue = result | 1 << 5;
        }
        result = helpValue;
        Console.WriteLine("Entered number {0} , binary of entered number {1}", number, Convert.ToString(number, 2).PadLeft(32, '0'));
        Console.WriteLine("Number with changed bins {0} , binary after change bins {1}", result, Convert.ToString(result, 2).PadLeft(32, '0'));
    }
}